package com.icxcc.listener;

import com.icxcc.constant.RabbitConstant;
import com.icxcc.service.RabbitMessageService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = RabbitConstant.DELAY_PROCESS_QUEUE)
public class ProcessMessageListener {
    private static Logger logger = LoggerFactory.getLogger(ProcessMessageListener.class);
    @Autowired
    private RabbitMessageService rabbitMessageService;

    @RabbitHandler
    public void process(String message){
        logger.info(message);
    }
}
